/**
 * 
 */
package travibot.ui.gui.forms.viewers;

import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;

import travibot.ui.gui.forms.listeners.CityListSelectionChangedListener;
import travibot.ui.gui.forms.listeners.FieldListSelectionChangedListener;
import travibot.ui.gui.forms.providers.content.FieldsContentProvider;
import travibot.ui.gui.forms.providers.label.FieldsLabelProvider;


/**
 * @author tajzivit
 *
 */
public class FieldsViewer extends TreeViewer {

    public FieldsViewer(Composite arg0){
        
        super(arg0);
        
        init();
    }
    
    public FieldsViewer(Composite arg0, int style){
        
        super(arg0, style);
        
        init();
    }
    
    public FieldsViewer(Tree tree) {

        super(tree);

        init();
    }
    
    private void init(){
        
        this.setLabelProvider(new FieldsLabelProvider());
        this.setContentProvider(new FieldsContentProvider());
        this.addSelectionChangedListener(new FieldListSelectionChangedListener());
    }
}
